// 不用plop 用 plop依赖组件完成自动化流程.
// 这是基本功,可以用于构建其他的CLI,不限于plop
const program = require('commander');
const inquirer = require('inquirer');

console.log('go');
program
  .version("0.0.1")
  .command('search <tablename>')
  .description('clone a repository into a newly created directory')
  .action(async(source, command) => {
    console.log('here,',source);
    let inquired = await inquirer.prompt([{
        type:'input',
        name:'tab',
        message:'table name'
    }]).then(tab=>tab.tab.toUpperCase());
    
    console.log('inquired is',inquired);
    
  });
  
program.parse(process.argv);

